
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>订单支付 - 胎大王</title>
	<meta charset="UTF-8">
	{include file='common/head' /}
	<script src="__JS__/layer/layer.js"></script>
</head>
<body>
<div class="container">
{include file='common/top' /}
	<div class="order">
		<div class="order-banner"></div>
		<div class="contai">
			<span class="f-bk30"></span><span class="f-bk10"></span>
			<div class="order-tit">
			{if condition="$data.status=='wait'"}
				<strong>订单支付</strong>
			{else /}
				<strong>订单详情</strong>
			{/if}
				
			</div>
			<span class="f-bk30"></span>
			<div class="cart-con">
				<table class="table tab-b1">
					<tr><td colspan="3"><span class="f-bk15"></span></td></tr>
					<tr>
						<td >·联系人：<span id="uname">{$data.consignee}</span></td>
						<td >·联系电话：<span id="uphone">{$data.phone}</span></td>
						<td>·配送方式：{$data.shippingMethods}</td>	
						{if condition="$data.status=='wait'"}
						<td colspan="2"> <button type="button" class="button-red pure-button order-edit" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">更改信息</button></td>				
						{else /}
						{/if}
					</tr>
					<tr>
						<td colspan="4">
							<div class="f-fl city">
								· 配送地址：{$data.address}
							</div>
						</td>

					</tr>
					<tr><td colspan="3"><span class="f-bk15"></span></td></tr>
				</table>

				<table id="cartTable" class="table tab-b2"  valign="middle">
					{empty name="$data['bonus']['items']"}
					{else /}
					<tr>
						<th width="60%">产品名称</th>
						<th width="20%" class="f-textc">产品单价</th>
						<th width="20%">购买数量</th>
					</tr>
					<tr><td colspan="5"><div class="order-type"><span>订单类型：</span> 分红式订单</div></td></tr>
					{volist name="$data['bonus']['items']" id="bonus"}
					<tr>
						<td class="tit"><img src="{$bonus.img}" alt="{$bonus.name}"><p><a >{$bonus.name}</a></p><p>轮胎类型：{$bonus.productCategory}</p></td>
						<td class="pices"><p>￥{$bonus.price}</p></td>
						<td><b class="fun-color-main">X{$bonus.quantity}</b></td>
					</tr>
					{/volist}
					<tr>
						<td colspan="6" class="cart-zq">&emsp; · 分红周期：
							<label class="act"><input name="zq" type="radio" class="cycle" value="{$data['bonus']['cycle']}" /> {$data['bonus']['cycle']}天&emsp;</label>
						</td>
					</tr>
					{/empty}
					{empty name="$data['deposit']['items']"}
					{else /}
					<tr>
						<th width="60%">产品名称</th>
						<th width="20%" class="f-textc">产品单价</th>
						<th width="20%">购买数量</th>
					</tr>
					<tr><td colspan="5"><div class="order-type"><span>订单类型：</span> 即时订单</div></td></tr>
					{volist name="$data['deposit']['items']" id="deposit"}
					<tr>
						<td class="tit"><img src="{$deposit.img}" alt="{$deposit.name}"><p><a >{$deposit.name}</a></p><p>轮胎类型：{$deposit.productCategory}</p></td>
						<td class="pices"><p>￥{$deposit.price}</p></td>
						<td><b class="fun-color-main">X{$deposit.quantity}</b></td>
					</tr>
					{/volist}
					{/empty}

				</table>
				<form  method="post" id="payForm">
					<div class="order-bottom">
						<div class="order-b1"></div>
						<div class="order-b2">
						{if condition="$data.status=='wait'"}
							<div class="pay f-fl">
							{volist name="$data['plugins']" id="pay" offset="0" length="1"}
								<label class="acts f-fl"><input type="radio" name="pay" value="{$pay.paymentPluginId}" checked> <i class="iconfont">&#xe7a1;</i> {$pay.paymentPluginName}&emsp;</label>
							{/volist}
							{volist name="$data['plugins']" id="pay" offset="1"}
								<label class="f-fl"><input type="radio" name="pay" value="{$pay.paymentPluginId}"> <i class="iconfont">&#xe7a1;</i> {$pay.paymentPluginName}({$data.balance})&emsp;</label>
							{/volist}							
							</div>
							<div class="f-bk10"></div>
							<div class="f-fr"><button type="button" id="payButtom"  class="button-red pure-button">立即支付</button></div>
						{else /}
						{/if}
							<div class="f-fr jine">应付总金额：<span id="amount">￥{$data.paidAmount}</span></div>
							<div class="f-fr jine">运费（到付）：<span id="freight">￥{$data.freightAmount}</span></div>
							<div class="f-fr jine">分红金额：<span id="discount">￥{$data.radixAmount}</span></div>
							<div class="f-fr jine">商品总价：<span id="amounts">￥{$data.originalAmount}</span></div>
							
						</div>
						<div class="order-b2"><div class="f-fr">以上运费仅供参考，以实际配送运费为准！</div></div>
						<span class="f-bk20"></span>
					</div>
					<input type="hidden" name="phone" id="phone"  value="{$data.phone}"/>
					<input type="hidden" name="consignee" id="consignee"  value="{$data.consignee}"/>
					<input type="hidden" name="sn"  id="sn" value="{$data.sn}" />
					<input type="hidden" name="paidAmount"  id="paidAmount" value="{$data.paidAmount}" />
					<input type="hidden" name="balance" id="balance"  value="{$data.balance}"/>
				</form>
				<span class="f-bk20"></span>
			</div>
			<span class="f-bk20"></span>
		</div>
	</div>
	{include file='common/foot' /}	
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">

  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="btn-info modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">修改信息</h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" role="form">
          <div class="form-group">
            <label for="recipient-name" class="control-label">&emsp;联系人:</label>
            <input type="text" class="form-control well" id="modal-name">
          </div>
          <div class="form-group">
            <label for="message-text" class="control-label">联系电话:</label>
            <input type="text" class="form-control well" id="modal-phone">
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary modal-submit">修改</button>
      </div>
    </div>
  </div>
</div>
</div>
<div style="display:none">
<form method="post" action="" id="payFormRes">
<input type="hidden" name="orig" />
<input type="hidden" name= "sign" />
<input type="hidden" name= "returnurl" />
<input type="hidden" name= "NOTIFYURL" /> 
</form>	
</div>
<script>
$(function(){
	$(".cart-zq label").click(function(){
		$(".cart-zq label").eq($(this).index()).addClass("act").siblings().removeClass('act');
	});
	$('.order .pay label').click(function(){
		$(this).addClass('acts').siblings().removeClass('acts');
	});	
});
</script>
<script type="text/javascript" src="__JS__/orderinfo-check-min.js"></script>
</body>
</html>